import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        cityId: '110100',
        cityName:'北京'
    },
    mutations:{
        changeCity(state, cityObj){
            console.log('cityObj', cityObj);
            state.cityId = cityObj.id,
            state.cityName = cityObj.name
        }
    }

})

export default store